package com.sudoku.manager.action;

import java.util.List;

import com.common.utils.JavaBeanUtils;
import com.opensymphony.xwork2.ActionSupport;
import com.pojo.Sudokuer;
import com.sudoku.manager.ManagerService;

@SuppressWarnings("serial")
public class ManagerAction extends ActionSupport {

	private ManagerService managerService;
	private String json2String;
	
	public ManagerService getManagerService() {
		return managerService;
	}
	public void setManagerService(ManagerService managerService) {
		this.managerService = managerService;
	}
	public String getJson2String() {
		return json2String;
	}
	public void setJson2String(String json2String) {
		this.json2String = json2String;
	}
	
	public String findAllRegister() {
		List<Sudokuer> list = managerService.findAllRegister();
		json2String = JavaBeanUtils.toJson(list);
//		System.out.println(json2String);
		return SUCCESS;
	}
}
